package org.com.yz.dubbo.web.core;


import org.com.yz.common.util.AES;

import java.io.UnsupportedEncodingException;

/**
 * @ClassName PassUtil
 * @Author wzc
 * @Date 2018/8/6 9:14
 **/
public class PassUtil {


    /**
     * AES加密
     * @return
     */
    public static String passTest() throws UnsupportedEncodingException {
        String pass="wq123456";
        String encrypt = AES.getInstance().encrypt(pass.getBytes("UTF8"));
        System.out.println("加密后："+encrypt );

        String decrypt = AES.getInstance().decrypt(encrypt);
        System.out.println("解密后："+decrypt );
        return decrypt;
    }


    public static void main(String[] args) throws UnsupportedEncodingException {
        passTest();
    }


}
